package com.kehutong.charge.service;

import com.kehutong.charge.dto.MeterReadStatistDTO;
import com.kehutong.charge.dto.MeterStatistDTO;
import com.kehutong.charge.entity.MeterReadStatist;
import com.kehutong.charge.entity.MeterReading;
import com.kehutong.charge.service.impl.MeterReadServiceImpl;
import com.kehutong.common.util.Token;
import org.coraframework.inject.ImplementedBy;
import org.coraframework.json.JSONObject;
import org.coraframework.orm.jdbc.Page;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @program: kht
 * @description: 抄表管理服务接口
 * @author: joneron
 * @create: 2021/6/29
 **/
@ImplementedBy(MeterReadServiceImpl.class)
public interface MeterReadService extends BaseService<MeterReading>{

    /**
     * 抄表统计
     */
    Page<MeterReadStatistDTO> findStatist(JSONObject jsonObject, Token token) throws Exception;

    /**
     * 统计列表数据
     */
    public Page<MeterReadStatist> findReadStatist(JSONObject jsonObject);


    /**
     * 统计列表数据导出
     * @param req
     * @param resp
     * @param jsonObject
     * @return
     */
    void findReadStatistExport(HttpServletRequest req, HttpServletResponse resp, JSONObject jsonObject);


    /**
     * 根据地址查询仪表
     * @param jsonObject
     * @return
     */
    MeterReading findMeterObj(JSONObject jsonObject);

    /**
     * 批量删除
     * @param jsonObject
     * @return
     */
    Object batchDelete(JSONObject jsonObject);

    void statistExport(HttpServletRequest req, HttpServletResponse resp, JSONObject jsonObject, Token token) throws Exception;

    Object getObj(JSONObject jsonObject);

    void pageExport(HttpServletRequest req, HttpServletResponse resp,JSONObject jsonObject);

    Object listImport(JSONObject jsonObject, Token token) throws Exception;

    Object save(MeterReading entity, Token token) throws Exception;

    void templateExport(HttpServletRequest req, HttpServletResponse resp, String meterTypeNo);

    void importExcelCheck(JSONObject jsonObject);

    void feeSettleDetail(JSONObject jsonObject, Token token);
}
